<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: esp8266/hal.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_cc2d49507704e901eabd8a82be491fc5.html">esp8266</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">hal.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="hal_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aae4c3f2e10c806143c255941be7aef16"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#aae4c3f2e10c806143c255941be7aef16">gpio_pin_sfr_mode</a> (int pin)</td></tr>
<tr class="memdesc:aae4c3f2e10c806143c255941be7aef16"><td class="mdescLeft">&#160;</td><td class="mdescRight">AVR GPIO MACROs.  <a href="#aae4c3f2e10c806143c255941be7aef16">More...</a><br /></td></tr>
<tr class="separator:aae4c3f2e10c806143c255941be7aef16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79f30eff50141a93c341181a9e088a6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a79f30eff50141a93c341181a9e088a6e">gpio16_pin_dir</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> out)</td></tr>
<tr class="separator:a79f30eff50141a93c341181a9e088a6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89f38d9e708a2136d2347bd1aff73010"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a89f38d9e708a2136d2347bd1aff73010">gpio_pin_out</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> pin, <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> val)</td></tr>
<tr class="memdesc:a89f38d9e708a2136d2347bd1aff73010"><td class="mdescLeft">&#160;</td><td class="mdescRight">set GPIO pin state HI or LOW  <a href="#a89f38d9e708a2136d2347bd1aff73010">More...</a><br /></td></tr>
<tr class="separator:a89f38d9e708a2136d2347bd1aff73010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63ffa405ecc5ed74cf654bc8f9b24023"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a63ffa405ecc5ed74cf654bc8f9b24023">gpio_pin_rd</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> pin)</td></tr>
<tr class="memdesc:a63ffa405ecc5ed74cf654bc8f9b24023"><td class="mdescLeft">&#160;</td><td class="mdescRight">read GPIO pin  <a href="#a63ffa405ecc5ed74cf654bc8f9b24023">More...</a><br /></td></tr>
<tr class="separator:a63ffa405ecc5ed74cf654bc8f9b24023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9eaae771107e6e01ef45ebe31ca99fdb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a9eaae771107e6e01ef45ebe31ca99fdb">chip_select_init</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> pin)</td></tr>
<tr class="memdesc:a9eaae771107e6e01ef45ebe31ca99fdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">CHIP select HAL.  <a href="#a9eaae771107e6e01ef45ebe31ca99fdb">More...</a><br /></td></tr>
<tr class="separator:a9eaae771107e6e01ef45ebe31ca99fdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad867d10e56c181c12b29a8871b0898f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#aad867d10e56c181c12b29a8871b0898f">chip_select</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> pin)</td></tr>
<tr class="memdesc:aad867d10e56c181c12b29a8871b0898f"><td class="mdescLeft">&#160;</td><td class="mdescRight">set GPIO to select - LOW  <a href="#aad867d10e56c181c12b29a8871b0898f">More...</a><br /></td></tr>
<tr class="separator:aad867d10e56c181c12b29a8871b0898f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb2f7085f2b840c81a765bf67d14de0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#adb2f7085f2b840c81a765bf67d14de0e">chip_deselect</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> pin)</td></tr>
<tr class="memdesc:adb2f7085f2b840c81a765bf67d14de0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">set GPIO to deselect - HI  <a href="#adb2f7085f2b840c81a765bf67d14de0e">More...</a><br /></td></tr>
<tr class="separator:adb2f7085f2b840c81a765bf67d14de0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11cf5f0150c215939c8b6e1f70fc0c8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a11cf5f0150c215939c8b6e1f70fc0c8c">chip_addr_init</a> (void)</td></tr>
<tr class="memdesc:a11cf5f0150c215939c8b6e1f70fc0c8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">ADDRESS select HAL.  <a href="#a11cf5f0150c215939c8b6e1f70fc0c8c">More...</a><br /></td></tr>
<tr class="separator:a11cf5f0150c215939c8b6e1f70fc0c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc9be250079b2b3fb01b888e431ec207"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#abc9be250079b2b3fb01b888e431ec207">chip_addr</a> (int addr)</td></tr>
<tr class="memdesc:abc9be250079b2b3fb01b888e431ec207"><td class="mdescLeft">&#160;</td><td class="mdescRight">set address on GPIO lines  <a href="#abc9be250079b2b3fb01b888e431ec207">More...</a><br /></td></tr>
<tr class="separator:abc9be250079b2b3fb01b888e431ec207"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e9642c8a1ccfc666d717835a6fab2bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a8e9642c8a1ccfc666d717835a6fab2bb">spi_waitReady</a> (void)</td></tr>
<tr class="memdesc:a8e9642c8a1ccfc666d717835a6fab2bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI bus wrapper functions for multiple device support.  <a href="#a8e9642c8a1ccfc666d717835a6fab2bb">More...</a><br /></td></tr>
<tr class="separator:a8e9642c8a1ccfc666d717835a6fab2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07907128317cdc79a94c6970d487b636"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a07907128317cdc79a94c6970d487b636">spi_init</a> (<a class="el" href="send_8c.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> clock, int pin)</td></tr>
<tr class="separator:a07907128317cdc79a94c6970d487b636"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd8b481ba21b545f53061c5ab7ff451e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#acd8b481ba21b545f53061c5ab7ff451e">spi_begin</a> (<a class="el" href="send_8c.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> clock, int pin)</td></tr>
<tr class="memdesc:acd8b481ba21b545f53061c5ab7ff451e"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI chip enable function Function waits for current tranaction to finish before proceeding.  <a href="#acd8b481ba21b545f53061c5ab7ff451e">More...</a><br /></td></tr>
<tr class="separator:acd8b481ba21b545f53061c5ab7ff451e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38fdaad472c50237f3d8821a01cda360"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a38fdaad472c50237f3d8821a01cda360">spi_end</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> pin)</td></tr>
<tr class="memdesc:a38fdaad472c50237f3d8821a01cda360"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI chip disable function wait for current tranaction to finish!  <a href="#a38fdaad472c50237f3d8821a01cda360">More...</a><br /></td></tr>
<tr class="separator:a38fdaad472c50237f3d8821a01cda360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab793fe14297fa898a039e36a305364b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#ab793fe14297fa898a039e36a305364b6">spi_chip_select_status</a> (void)</td></tr>
<tr class="memdesc:ab793fe14297fa898a039e36a305364b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI CS pin status return CS GPIO pin number or 0xff.  <a href="#ab793fe14297fa898a039e36a305364b6">More...</a><br /></td></tr>
<tr class="separator:ab793fe14297fa898a039e36a305364b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a445c14cf602a0b3dd085ee963a7986a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a445c14cf602a0b3dd085ee963a7986a0">spi_TX_buffer</a> (const <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, int count)</td></tr>
<tr class="memdesc:a445c14cf602a0b3dd085ee963a7986a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI write buffer.  <a href="#a445c14cf602a0b3dd085ee963a7986a0">More...</a><br /></td></tr>
<tr class="separator:a445c14cf602a0b3dd085ee963a7986a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fca48fcdb736ef3af2179ae8b10d963"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a1fca48fcdb736ef3af2179ae8b10d963">spi_RX_buffer</a> (const <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, int count)</td></tr>
<tr class="memdesc:a1fca48fcdb736ef3af2179ae8b10d963"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI read buffer.  <a href="#a1fca48fcdb736ef3af2179ae8b10d963">More...</a><br /></td></tr>
<tr class="separator:a1fca48fcdb736ef3af2179ae8b10d963"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79519dd3475dcb68112f162379287e20"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a79519dd3475dcb68112f162379287e20">spi_TXRX_buffer</a> (const <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, int count)</td></tr>
<tr class="memdesc:a79519dd3475dcb68112f162379287e20"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI write/read buffer.  <a href="#a79519dd3475dcb68112f162379287e20">More...</a><br /></td></tr>
<tr class="separator:a79519dd3475dcb68112f162379287e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66dbd94d620839aac3f7515d969a5174"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a66dbd94d620839aac3f7515d969a5174">spi_RX</a> (void)</td></tr>
<tr class="memdesc:a66dbd94d620839aac3f7515d969a5174"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI read 1 byte.  <a href="#a66dbd94d620839aac3f7515d969a5174">More...</a><br /></td></tr>
<tr class="separator:a66dbd94d620839aac3f7515d969a5174"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1df55cfc018c50c9aec77000eae858c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#ae1df55cfc018c50c9aec77000eae858c">spi_TX</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data)</td></tr>
<tr class="memdesc:ae1df55cfc018c50c9aec77000eae858c"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI write 1 byte.  <a href="#ae1df55cfc018c50c9aec77000eae858c">More...</a><br /></td></tr>
<tr class="separator:ae1df55cfc018c50c9aec77000eae858c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9617412610d280bbb4886674790d7d3e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hal_8h.html#a9617412610d280bbb4886674790d7d3e">spi_TXRX</a> (<a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data)</td></tr>
<tr class="memdesc:a9617412610d280bbb4886674790d7d3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI read and write 1 byte.  <a href="#a9617412610d280bbb4886674790d7d3e">More...</a><br /></td></tr>
<tr class="separator:a9617412610d280bbb4886674790d7d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="abc9be250079b2b3fb01b888e431ec207"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chip_addr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set address on GPIO lines </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="hal_8c.html#abd54cabf9040258ff4de02954a575e6a" title="ADDRESS select HAL. ">chip_addr_init</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>device address </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00271">271</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

</div>
</div>
<a class="anchor" id="a11cf5f0150c215939c8b6e1f70fc0c8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chip_addr_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ADDRESS select HAL. </p>
<p>initialize GPIO pin as address lines for a device </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00242">242</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00971">setup()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00112">tft_addr_init()</a>.</p>

</div>
</div>
<a class="anchor" id="adb2f7085f2b840c81a765bf67d14de0e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chip_deselect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set GPIO to deselect - HI </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO pin number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00227">227</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="hal_8c_source.html#l00388">spi_end()</a>, and <a class="el" href="hal_8c_source.html#l00327">spi_init()</a>.</p>

</div>
</div>
<a class="anchor" id="aad867d10e56c181c12b29a8871b0898f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chip_select </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set GPIO to select - LOW </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO pin number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00213">213</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="hal_8c_source.html#l00355">spi_begin()</a>.</p>

</div>
</div>
<a class="anchor" id="a9eaae771107e6e01ef45ebe31ca99fdb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void chip_select_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CHIP select HAL. </p>
<p>initilize GPIO as an active HI chip select </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO pin number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00198">198</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="mmc__hal_8c_source.html#l00088">mmc_spi_init()</a>, <a class="el" href="user__main_8c_source.html#l00971">setup()</a>, <a class="el" href="ili9341__hal_8c_source.html#l00094">tft_reset_init()</a>, <a class="el" href="ili9341__hal_8c_source.html#l00072">tft_spi_init_fast()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00064">tft_spi_init_slow()</a>.</p>

</div>
</div>
<a class="anchor" id="a79f30eff50141a93c341181a9e088a6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gpio16_pin_dir </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>out</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="hal_8c_source.html#l00052">gpio_pin_sfr_mode()</a>.</p>

</div>
</div>
<a class="anchor" id="a89f38d9e708a2136d2347bd1aff73010"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gpio_pin_out </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set GPIO pin state HI or LOW </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO pin number </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>1 for output, 0 for input </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00155">155</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

</div>
</div>
<a class="anchor" id="a63ffa405ecc5ed74cf654bc8f9b24023"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> gpio_pin_rd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>read GPIO pin </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO pin number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 or 0 </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00178">178</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

</div>
</div>
<a class="anchor" id="aae4c3f2e10c806143c255941be7aef16"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gpio_pin_sfr_mode </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AVR GPIO MACROs. </p>
<p>ESP8266 GPIO MACROs</p>
<p>AVR GPIO MACROs.</p>
<p>set GPIO SFR to permit normal GPIO mode </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>gpin pin number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00052">52</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

</div>
</div>
<a class="anchor" id="acd8b481ba21b545f53061c5ab7ff451e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
          <td class="paramname"><em>clock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI chip enable function Function waits for current tranaction to finish before proceeding. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="hal_8c.html#a98abd8ed313db191648e1d7ae2720f83" title="SPI bus wrapper functions for multiple device support. ">spi_waitReady</a> </dd>
<dd>
<a class="el" href="hal_8c.html#aad867d10e56c181c12b29a8871b0898f" title="set GPIO to select - LOW ">chip_select</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">clock</td><td>SPI clock rate </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO CS pin </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p>initialize pin in case it has not been done yet @ we cache the clock frequency seeting for multiple device support </p>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00355">355</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="mmc__hal_8c_source.html#l00097">mmc_spi_begin()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00080">tft_spi_begin()</a>.</p>

</div>
</div>
<a class="anchor" id="ab793fe14297fa898a039e36a305364b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> spi_chip_select_status </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI CS pin status return CS GPIO pin number or 0xff. </p>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00404">404</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00533">loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a38fdaad472c50237f3d8821a01cda360"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_end </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI chip disable function wait for current tranaction to finish! </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="hal_8c.html#a98abd8ed313db191648e1d7ae2720f83" title="SPI bus wrapper functions for multiple device support. ">spi_waitReady</a> </dd>
<dd>
<a class="el" href="hal_8c.html#adb2f7085f2b840c81a765bf67d14de0e" title="set GPIO to deselect - HI ">chip_deselect</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>GPIO CS pin </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00388">388</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00533">loop()</a>, <a class="el" href="mmc__hal_8c_source.html#l00104">mmc_spi_end()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00087">tft_spi_end()</a>.</p>

</div>
</div>
<a class="anchor" id="a07907128317cdc79a94c6970d487b636"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
          <td class="paramname"><em>clock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="hal_8c_source.html#l00327">327</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="hal_8c_source.html#l00355">spi_begin()</a>.</p>

</div>
</div>
<a class="anchor" id="a66dbd94d620839aac3f7515d969a5174"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> spi_RX </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI read 1 byte. </p>
<dl class="section return"><dt>Returns</dt><dd>uint8_t value </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00454">454</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

</div>
</div>
<a class="anchor" id="a1fca48fcdb736ef3af2179ae8b10d963"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_RX_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI read buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*data</td><td>transmit buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>number of bytes to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00428">428</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="mmc__hal_8c_source.html#l00142">mmc_spi_RX_buffer()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00165">tft_spi_RX()</a>.</p>

</div>
</div>
<a class="anchor" id="ae1df55cfc018c50c9aec77000eae858c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_TX </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI write 1 byte. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>value to transmit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00469">469</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="hal_8c_source.html#l00327">spi_init()</a>.</p>

</div>
</div>
<a class="anchor" id="a445c14cf602a0b3dd085ee963a7986a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_TX_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI write buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*data</td><td>transmit buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>number of bytes to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00414">414</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="mmc__hal_8c_source.html#l00133">mmc_spi_TX_buffer()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00134">tft_spi_TX()</a>.</p>

</div>
</div>
<a class="anchor" id="a9617412610d280bbb4886674790d7d3e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> spi_TXRX </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI read and write 1 byte. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>value to transmit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>uint8_t value read </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00483">483</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="mmc__hal_8c_source.html#l00150">mmc_spi_TXRX()</a>.</p>

</div>
</div>
<a class="anchor" id="a79519dd3475dcb68112f162379287e20"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_TXRX_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI write/read buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*data</td><td>transmit/receive buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>number of bytes to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00442">442</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="ili9341__hal_8c_source.html#l00149">tft_spi_TXRX()</a>.</p>

</div>
</div>
<a class="anchor" id="a8e9642c8a1ccfc666d717835a6fab2bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spi_waitReady </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI bus wrapper functions for multiple device support. </p>
<p>Function waits for current SPI tranaction to finish before proceeding </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="hal_8c_source.html#l00306">306</a> of file <a class="el" href="hal_8c_source.html">hal.c</a>.</p>

<p>Referenced by <a class="el" href="hal_8c_source.html#l00355">spi_begin()</a>, <a class="el" href="hal_8c_source.html#l00388">spi_end()</a>, <a class="el" href="hal_8c_source.html#l00327">spi_init()</a>, <a class="el" href="ili9341__hal_8c_source.html#l00165">tft_spi_RX()</a>, <a class="el" href="ili9341__hal_8c_source.html#l00134">tft_spi_TX()</a>, and <a class="el" href="ili9341__hal_8c_source.html#l00149">tft_spi_TXRX()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
